import request from '@/utils/request'

export function upload(data){
    return request({
        url: `/file`,
        headers:{"Content-Type": "application/x-www-form-urlencoded; charset=UTF-8"},
        method: 'POST',
        data:data
      });
} 

// 通用文件上传方法
export function uploadFile(url, formData) {
    return request({
        url: url,
        method: 'POST',
        data: formData,
        headers: {
            'Content-Type': 'multipart/form-data'
        }
    });
} 
